package com.plan.demo.config;

import lombok.Data;

@Data
public class AjaxResult {
    private int code ;
    private String msg ;
    private Object data ;

    public AjaxResult(int code, String msg, Object data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

    public static AjaxResult success(Object data){
        return new AjaxResult(200,"请求成功",data);
    }

    public static AjaxResult success(String msg){
        return new AjaxResult(200,msg,null);
    }
}
